package patrol.mobile.com.mobilepatrol.bean;

import android.text.TextUtils;

import java.util.List;

/**
 * Created by z on 2018/10/28.
 * Des:
 */

public class JiankkElefailrecList {

    /**
     * list : [{"id":"278a9d5330324424986ae8d911136607","isNewRecord":false,"createDate":"2018-10-08 11:10:13","updateDate":"2018-10-08 12:39:33","org":{"id":"b37fa1e91bd44824aa8d6620c5611748","isNewRecord":false,"orderNo":0,"isLeaf":false,"treeTable":"sys_org","orgName":"巴楚分局","officeId":0,"extParentData":false,"noUsed":false,"state":"closed"},"reportOrgName":"巴楚分局","account":{"id":"84ad799558d443579003c3b0961442a4","isNewRecord":false,"name":"张炎生"},"elefailurerpt":{"id":"c7f81e1f036c4baab018859d023c4953","isNewRecord":false,"equipmentName":"监控器","failureType":"1"},"date":"2018-10-08 11:09:50","finishDate":"2018-10-08 12:39:21","failureContent":"请更换电脑主机","maintenance":"1","failureReason":"2"},{"id":"94fde572ae2545fb8cae52888cbf9960","isNewRecord":false,"createDate":"2018-09-30 18:47:22","updateDate":"2018-09-30 18:48:14","org":{"id":"79cb1394c76247b59887df3b2e179d9b","isNewRecord":false,"orderNo":0,"isLeaf":false,"treeTable":"sys_org","orgName":"英吉沙分局","officeId":0,"extParentData":false,"noUsed":false,"state":"closed"},"reportOrgName":"喀什公路管理局","account":{"id":"758e124dc13b4653b83e68f23a818a48","isNewRecord":false,"name":"阿布都维力·阿布力孜"},"elefailurerpt":{"id":"7545f28f323c4b5f94c4fbbf0bac22cc","isNewRecord":false,"equipmentName":"监控器","failureType":"1"},"date":"2018-09-30 18:47:20","failureContent":"ww","maintenance":"1","failureReason":"2"},{"id":"de8afe48f57142938b86c0452f59fdd9","isNewRecord":false,"createDate":"2018-09-30 16:37:23","updateDate":"2018-09-30 16:37:23","org":{"id":"79cb1394c76247b59887df3b2e179d9b","isNewRecord":false,"orderNo":0,"isLeaf":false,"treeTable":"sys_org","orgName":"英吉沙分局","officeId":0,"extParentData":false,"noUsed":false,"state":"closed"},"reportOrgName":"喀什公路管理局","account":{"id":"a07bbc86b838474fa8913edbe2d2b6cf","isNewRecord":false,"name":"图尔逊江乌守尔"},"elefailurerpt":{"id":"7545f28f323c4b5f94c4fbbf0bac22cc","isNewRecord":false,"equipmentName":"监控器","failureType":"1"},"date":"2018-09-19 16:37:11","failureContent":"1111","maintenance":"1","failureReason":"2"},{"id":"53639041aec041a7b2c6e43db066dae2","isNewRecord":false,"createDate":"2018-09-30 16:28:25","updateDate":"2018-09-30 16:28:25","org":{"id":"9ad27fa5f3f94c67a6359941952d6eb5","isNewRecord":false,"orderNo":0,"isLeaf":false,"treeTable":"sys_org","orgName":"喀什分局","officeId":0,"extParentData":false,"noUsed":false,"state":"closed"},"reportOrgName":"喀什公路管理局","account":{"id":"a07bbc86b838474fa8913edbe2d2b6cf","isNewRecord":false,"name":"图尔逊江乌守尔"},"elefailurerpt":{"id":"7545f28f323c4b5f94c4fbbf0bac22cc","isNewRecord":false,"equipmentName":"监控器","failureType":"1"},"date":"2018-09-30 16:28:23","failureContent":"请求","maintenance":"2","failureReason":"3"},{"id":"a577b9f4dca44a7a8f2212af70e27aa9","isNewRecord":false,"createDate":"2018-09-30 16:27:57","updateDate":"2018-09-30 16:27:57","org":{"id":"79cb1394c76247b59887df3b2e179d9b","isNewRecord":false,"orderNo":0,"isLeaf":false,"treeTable":"sys_org","orgName":"英吉沙分局","officeId":0,"extParentData":false,"noUsed":false,"state":"closed"},"reportOrgName":"喀什公路管理局","account":{"id":"a07bbc86b838474fa8913edbe2d2b6cf","isNewRecord":false,"name":"图尔逊江乌守尔"},"elefailurerpt":{"id":"7545f28f323c4b5f94c4fbbf0bac22cc","isNewRecord":false,"equipmentName":"监控器","failureType":"1"},"date":"2018-09-30 16:27:54","failureContent":"路线有问题","maintenance":"1","failureReason":"1"},{"id":"4d404f9abf1943278596236d926dae73","isNewRecord":false,"createDate":"2018-09-30 11:11:30","updateDate":"2018-09-30 11:11:30","org":{"id":"b37fa1e91bd44824aa8d6620c5611748","isNewRecord":false,"orderNo":0,"isLeaf":false,"treeTable":"sys_org","orgName":"巴楚分局","officeId":0,"extParentData":false,"noUsed":false,"state":"closed"},"reportOrgName":"喀什公路管理局","account":{"id":"1","isNewRecord":false,"name":"系统管理员"},"elefailurerpt":{"id":"7545f28f323c4b5f94c4fbbf0bac22cc","isNewRecord":false,"equipmentName":"监控器","failureType":"1"},"date":"2018-09-30 11:11:28","failureContent":"故障描述","maintenance":"1","failureReason":"1"},{"id":"700c0ddba1284bcbbc75bf20e218b51a","isNewRecord":false,"createDate":"2018-09-28 17:41:18","updateDate":"2018-09-29 11:13:16","org":{"id":"7b6333a8470645d1bd06c4c87cef5cd3","isNewRecord":false,"orderNo":0,"isLeaf":false,"treeTable":"sys_org","orgName":"岳普湖分局","officeId":0,"extParentData":false,"noUsed":false,"state":"closed"},"reportOrgName":"监控科","account":{"id":"51e4c03085f04527ac77e21f15859034","isNewRecord":false,"name":"艾力木拉提"},"elefailurerpt":{"id":"d07dd1c8d3514d15abb87288cfc68171","isNewRecord":false,"equipmentName":"马卢达","failureType":"1"},"date":"2018-09-18 17:41:48","failureContent":"看不见","maintenance":"3","failureReason":"3"},{"id":"faa8abff59724d7db5404d85529c9790","isNewRecord":false,"createDate":"2018-09-28 17:26:43","updateDate":"2018-09-28 19:17:40","org":{"id":"5416809d3e5248f0b63796dc53d8f7bd","isNewRecord":false,"orderNo":0,"isLeaf":false,"treeTable":"sys_org","orgName":"疏附分局","officeId":0,"extParentData":false,"noUsed":false,"state":"closed"},"reportOrgName":"监控科","account":{"id":"5aa1f506cb884bd791c79b0dd5cbe9da","isNewRecord":false,"name":"柳建新"},"elefailurerpt":{"id":"d611d224e0744179ad0fe2e1bd218e5e","isNewRecord":false,"equipmentName":"345","failureType":"6"},"date":"2018-09-27 17:27:50","failureContent":"34333","maintenance":"4","failureReason":"3"}]
     * rows : 8
     */

    private int rows;
    private List<ListBean> list;

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean {
        /**
         * id : 278a9d5330324424986ae8d911136607
         * isNewRecord : false
         * createDate : 2018-10-08 11:10:13
         * updateDate : 2018-10-08 12:39:33
         * org : {"id":"b37fa1e91bd44824aa8d6620c5611748","isNewRecord":false,"orderNo":0,"isLeaf":false,"treeTable":"sys_org","orgName":"巴楚分局","officeId":0,"extParentData":false,"noUsed":false,"state":"closed"}
         * reportOrgName : 巴楚分局
         * account : {"id":"84ad799558d443579003c3b0961442a4","isNewRecord":false,"name":"张炎生"}
         * elefailurerpt : {"id":"c7f81e1f036c4baab018859d023c4953","isNewRecord":false,"equipmentName":"监控器","failureType":"1"}
         * date : 2018-10-08 11:09:50
         * finishDate : 2018-10-08 12:39:21
         * failureContent : 请更换电脑主机
         * maintenance : 1
         * failureReason : 2
         */

        private String id;
        private boolean isNewRecord;
        private String createDate;
        private String updateDate;
        private OrgBean org;
        private String reportOrgName;
        private AccountBean account;
        private ElefailurerptBean elefailurerpt;
        private String date;
        private String finishDate;
        private String failureContent;
        private String maintenance;
        private String failureReason;
        private String repairFlag;

        public String getRepairFlag() {// 维修状态 1：未维修 2：维修中 3：维修完成
            switch (repairFlag) {
                case "1":
                    return "未维修";
                case "2":
                    return "维修中";
                case "3":
                    return "维修完成";
                default:
                    return "未维修";
            }
        }

        public void setRepairFlag(String repairFlag) {
            this.repairFlag = repairFlag;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public boolean isIsNewRecord() {
            return isNewRecord;
        }

        public void setIsNewRecord(boolean isNewRecord) {
            this.isNewRecord = isNewRecord;
        }

        public String getCreateDate() {
            return createDate;
        }

        public void setCreateDate(String createDate) {
            this.createDate = createDate;
        }

        public String getUpdateDate() {
            return updateDate;
        }

        public void setUpdateDate(String updateDate) {
            this.updateDate = updateDate;
        }

        public OrgBean getOrg() {
            return org;
        }

        public void setOrg(OrgBean org) {
            this.org = org;
        }

        public String getReportOrgName() {
            return reportOrgName;
        }

        public void setReportOrgName(String reportOrgName) {
            this.reportOrgName = reportOrgName;
        }

        public AccountBean getAccount() {
            return account;
        }

        public void setAccount(AccountBean account) {
            this.account = account;
        }

        public ElefailurerptBean getElefailurerpt() {
            return elefailurerpt;
        }

        public void setElefailurerpt(ElefailurerptBean elefailurerpt) {
            this.elefailurerpt = elefailurerpt;
        }

        public String getDate() {
            return date;
        }

        public void setDate(String date) {
            this.date = date;
        }

        public String getFinishDate() {
            return finishDate;
        }

        public void setFinishDate(String finishDate) {
            this.finishDate = finishDate;
        }

        public String getFailureContent() {
            return failureContent;
        }

        public void setFailureContent(String failureContent) {
            this.failureContent = failureContent;
        }

        public String getMaintenance() {
            return maintenance;
        }

        public void setMaintenance(String maintenance) {
            this.maintenance = maintenance;
        }

        public String getFailureReason() {
            return failureReason;
        }

        public void setFailureReason(String failureReason) {
            this.failureReason = failureReason;
        }

        public static class OrgBean {
            /**
             * id : b37fa1e91bd44824aa8d6620c5611748
             * isNewRecord : false
             * orderNo : 0
             * isLeaf : false
             * treeTable : sys_org
             * orgName : 巴楚分局
             * officeId : 0
             * extParentData : false
             * noUsed : false
             * state : closed
             */

            private String id;
            private boolean isNewRecord;
            private int orderNo;
            private boolean isLeaf;
            private String treeTable;
            private String orgName;
            private int officeId;
            private boolean extParentData;
            private boolean noUsed;
            private String state;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public boolean isIsNewRecord() {
                return isNewRecord;
            }

            public void setIsNewRecord(boolean isNewRecord) {
                this.isNewRecord = isNewRecord;
            }

            public int getOrderNo() {
                return orderNo;
            }

            public void setOrderNo(int orderNo) {
                this.orderNo = orderNo;
            }

            public boolean isIsLeaf() {
                return isLeaf;
            }

            public void setIsLeaf(boolean isLeaf) {
                this.isLeaf = isLeaf;
            }

            public String getTreeTable() {
                return treeTable;
            }

            public void setTreeTable(String treeTable) {
                this.treeTable = treeTable;
            }

            public String getOrgName() {
                return orgName;
            }

            public void setOrgName(String orgName) {
                this.orgName = orgName;
            }

            public int getOfficeId() {
                return officeId;
            }

            public void setOfficeId(int officeId) {
                this.officeId = officeId;
            }

            public boolean isExtParentData() {
                return extParentData;
            }

            public void setExtParentData(boolean extParentData) {
                this.extParentData = extParentData;
            }

            public boolean isNoUsed() {
                return noUsed;
            }

            public void setNoUsed(boolean noUsed) {
                this.noUsed = noUsed;
            }

            public String getState() {
                return state;
            }

            public void setState(String state) {
                this.state = state;
            }
        }

        public static class AccountBean {
            /**
             * id : 84ad799558d443579003c3b0961442a4
             * isNewRecord : false
             * name : 张炎生
             */

            private String id;
            private boolean isNewRecord;
            private String name;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public boolean isIsNewRecord() {
                return isNewRecord;
            }

            public void setIsNewRecord(boolean isNewRecord) {
                this.isNewRecord = isNewRecord;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }
        }

        public static class ElefailurerptBean {
            /**
             * id : c7f81e1f036c4baab018859d023c4953
             * isNewRecord : false
             * equipmentName : 监控器
             * failureType : 1
             */

            private String id;
            private boolean isNewRecord;
            private String equipmentName;
            private String failureType;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public boolean isIsNewRecord() {
                return isNewRecord;
            }

            public void setIsNewRecord(boolean isNewRecord) {
                this.isNewRecord = isNewRecord;
            }

            public String getEquipmentName() {
                if (TextUtils.isEmpty(equipmentName)) {
                    return "未审核";
                }
                return equipmentName;
            }

            public void setEquipmentName(String equipmentName) {
                this.equipmentName = equipmentName;
            }

            public String getFailureType() {
                switch (failureType) {
                    case "1":
                        return "收费";
                    case "2":
                        return "通信";
                    case "3":
                        return "供电";
                    case "4":
                        return "照明";
                    case "5":
                        return "通风";
                    case "6":
                        return "监控";
                    default:
                        return failureType;
                }
            }

            public void setFailureType(String failureType) {
                this.failureType = failureType;
            }
        }
    }
}
